package com.tyk.bookstore.front.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Schema(name = "Collect", description = "书籍收藏")
@TableName("book_collect")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BookCollectDo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1;

    @Schema(description = "书籍ID")
    @TableField("book_id")
    private Long bookId;

    @Schema(description = "会员ID")
    @TableField("member_id")
    private Long memberId;

    @Schema(description = "收藏时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    public BookCollectDo(Long bookId, Long memberId) {
        this.bookId = bookId;
        this.memberId = memberId;
    }
}
